home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / diskutil / cache.arc / readme < prev   
Encoding:
Text File  |  1988-05-11  |  2.6 KB  |  60 lines

  1.             Floppy Disk Cache
  2.  
  3.     What is a disk cache?
  4. A disk cache is resident program that speeds up disk IO
  5. by keeping a copy of recently used sectors of the disk
  6. in RAM memory.  It is similar to a RAM disk but has the
  7. advantage that files are always up-to-date on the disk.
  8. You can't lose files like a RAM disk does when the system crashes.
  9.  
  10. This cache will typically eliminate from 50-85% of disk IO if enough
  11. cached sectors are installed. There is a slight CPU
  12. overhead in copying sectors to the cache after disk IO.
  13.  
  14.     Installation
  15. The programs cache.ttp and cstat.ttp should be placed
  16. in your directory for executable files, usually \bin.
  17. cache.ttp should be run from a shell startup file;
  18. for example gulam.g under Gulam or GemBoot's startup file.
  19. The first argument to "cache" is the size of the cache in K-bytes,
  20. which defaults to 50K.  The size can be preceeded by a drive letter.
  21. Run "cache" twice if you need to cache two drives.
  22. If you install cache.ttp as \auto\cache.prg
  23. there is no way to set the drive or cache size without modifing the source.
  24.  
  25.     Operation
  26. The cache clears automatically whenever you change disks.
  27. Make sure all your disks have been formatted correctly with unique
  28. serial numbers. An early version of twister and any bit-image
  29. disk copy program will not generate unique serial numbers.
  30. An easy way to check for unique serial numbers is:
  31. list the root directory, switch disks, list the root directory.
  32. If the directory lists are identical then the serial numbers may be the same.
  33. You will probably trash disks even without a disk cache
  34. when you have non-unique serial numbers.
  35.  
  36. The utility "cstat" will print some statistics averaged over
  37. the last 1000 (approx.) sectors of IO.
  38.  
  39.     Other Hints
  40. Using a "fast" formatter like DC Format will speed up disk IO further.
  41. You can also turn off write verify with DC Format or pokew in Gulam,
  42. but there is some risk of losing files then.
  43. It also helps to create all directories before anything else
  44. is placed on a new disk, this speeds up file creation and deletion.
  45.  
  46.     Compilation
  47. This program is written completly in C for readability and portablity.
  48. The cache program should be compiled with the dLibs library or MWC.
  49. It requires the _base, _break, and _STKSIZ variables dLibs implements.
  50. Non-standard compilers may require a "define short int".
  51. Please indicate in the source and object when you make non-trivial changes.
  52.  
  53.     Possible Extensions
  54. Modify it for multiple hard disk partitions.  This is non-trivial.
  55. The current algorithm assumes sectors can be accessed through
  56. cache[sector]. The cache array would be 160K bytes for a 20M byte drive,
  57. and is scanned sequentially in a couple of places.
  58.  
  59.     Eric Gisin, egisin@UWaterloo.CA
  60.